package org.tis.tools.starter.mybatisplus.querykit.enums;

import org.tis.tools.starter.mybatisplus.querykit.unit.*;

/**
 * description: COLUMN的运算符
 *
 * @author zhaoch
 * @date 2018/10/8
 **/
public enum QueryOperator {

    /**
     * 运算符表达式
     */
    EQ("eq", "等于", EqQuery.class),

    NE("ne", "不等于", NeQuery.class),

    GT("gt", "大于", GtQuery.class),

    GE("ge", "大于等于", GeQuery.class),

    LT("lt", "小于", LtQuery.class),

    LE("le", "小于等于", LeQuery.class),

    LIKE("like", "模糊匹配", LikeQuery.class),

    NOT_LIKE("notLike", "模糊非匹配", NotLikeQuery.class),

    IS_NULL("isNull", "为空", IsNullQuery.class),

    IS_NOT_NULL("isNotNull", "不为空", IsNotNullQuery.class),

    IN("in", "包含", InQuery.class),

    NOT_IN("notIn", "不包含", NotInQuery.class),

    BETWEEN("between", "介于", BetweenQuery.class),

    NOT_BETWEEN("notBetween", "非介于", NotBetweenQuery.class);


    private final String operator;

    private final String desc;

    private final Class clazz;

    QueryOperator(final String operator, final String desc, final Class clazz) {
        this.operator = operator;
        this.desc = desc;
        this.clazz = clazz;
    }

    public Class getClazz() {
        return clazz;
    }
}
